import request from '../utils/request'
import config from '../utils/config'

export function loginUser(data) {
  return request({
    url: `${config.host}/wx/auth/phone`,
    method: 'post',
    data,
    isNoToken: true
  })
}

export function getUserInfo(openId, isShowLogin = true) {
  return request({
    url: `${config.host}/wx/auth/info?openId=${openId}`,
    isShowLogin
  })
}
export function getWxConfig(data) {
  return request({
    url: `${config.host}/wx/dict/getWxConfig`,
    method: "get",
    isHideToast: true,
  });
}